package us.nchu.tomtiger.rowMapper;

import org.springframework.jdbc.core.RowMapper;
import us.nchu.tomtiger.model.Project;
import us.nchu.tomtiger.model.ProjectPending;
import us.nchu.tomtiger.model.UserPending;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * Created by XiongXuan on 2018/1/11.
 */
public class ProjectPendingRowMapper implements RowMapper<ProjectPending> {

    @Override
    public ProjectPending mapRow(ResultSet resultSet, int i) throws SQLException {
        ProjectPending projectPending = new ProjectPending();

        projectPending.setId(resultSet.getInt("id"));
        projectPending.setPendingProjectId(resultSet.getInt("pending_project_id"));
        projectPending.setPhoneNumber(resultSet.getString("phone_number"));
        projectPending.setResult(resultSet.getInt("result"));

        return projectPending;
    }
}
